package com.template.app.web.list;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.template.app.model.Template;
import com.template.app.model.TemplateRef;
import com.template.app.service.TemplateService;
import com.template.app.support.ControllerHelper;

//@Controller
//@RequestMapping(Template.NAME)
public class TemplateList {/*
	
	public static final String VIEW_LIST = Template.NAME + ControllerSupport.VIEW_LIST;
	public static final String VIEW_FORM = Template.NAME + ControllerSupport.VIEW_FORM;

	@Autowired
	private TemplateService service;
	
	@RequestMapping(value = ControllerSupport.LIST, method = RequestMethod.GET)
	public ModelAndView list() {		
		List<Template> list = service.list();
		return new ModelAndView(VIEW_LIST, "list", list);
	}
	
	@RequestMapping(value = ControllerSupport.LIST_BY + TemplateRef.NAME, method = RequestMethod.GET)
	public ModelAndView lisByTemplateRef(@RequestParam Integer id) {		
		List<Template> list = service.lisByTemplateRef(id);
		return new ModelAndView(VIEW_LIST, "list", list);
	}
*/}
